package com.scs.application.modules.cert.controller;

import com.scs.application.core.model.CommonResult;
import com.scs.application.core.mvc.controller.BaseController;
import com.scs.application.modules.cert.service.CertificateRepositoryService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@ClassName WorkbenchController
 *@Description TODO
 */
@RequestMapping("/cert/workbench")
@AllArgsConstructor
@RestController
public class CertWorkbenchController extends BaseController {

    private CertificateRepositoryService certificateRepositoryService;

    @GetMapping("count_for_hospital")
    public CommonResult countForHospital(){
        int count = certificateRepositoryService.countForHospital();
        return CommonResult.ok("查询成功", count);
    }

    @GetMapping("count_for_supplier")
    public CommonResult countForSupplier(){
        int count = certificateRepositoryService.countForSupplier();
        return CommonResult.ok("查询成功", count);
    }
}

